import { Service } from "egg";

export default class MessageServer extends Service {
  // 发送文字消息
  async postText(wxGeweToken, params: { appId: string; toWxid: string; content: string; ats?: string }) {
    const { ctx } = this;

    const client = await ctx.service.geweChat.client.getGeweChatSdk(wxGeweToken);
    const res = await client.exec("message/postText", params);

    return res;
  }
}
